export interface MenuAllResponse {
  id: number
  name: string
  type: 'directory' | 'menu' | 'button' | 'api'
  parentId: null | number
  parentName: null | string
  permCode: string
  title: string
  component: string
  componentName: string
  path: string
  icon: string
  activeMenu: string
  status: boolean
  hidden: boolean
  alwaysShow: boolean
  noCache: boolean
  breadcrumb: boolean
  affix: boolean
  noTagsView: boolean
  canTo: boolean
  sort: number
  createdAt: string
  updatedAt: string
}

export interface PermissionType {
  button: string[]
  api: string[]
}

export interface MenuPageParams {
  name: string
  title: string
  status: boolean
  pageNum: number
  pageSize: number
}

export interface MenuCreateData {
  name?: string
  type?: string
  parentId?: number
  title?: string
  component: string
  componentName?: string
  icon?: string
  path: string
  activeMenu?: string
  status?: false
  hidden?: false
  alwaysShow?: false
  noCache?: false
  breadcrumb?: false
  affix?: false
  noTagsView?: false
  canTo?: false
}

export interface MenuUpdateData extends MenuCreateData {
  id: number
}
